package com.jason.learn.springcloud.accountservice.dao;

import com.jason.learn.springcloud.accountservice.mapper.AccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

@Component
public class AccountDao {
    @Autowired
    AccountMapper accountMapper;

    @Transactional
   public void addMoney(Long accountId,BigDecimal amount) {
       accountMapper.addMoney(accountId,amount);
   }
}
